# -*- coding: utf-8 -*-

"""
DateTime   : 2021/04/04 10:34
Author     : ZhangYafei
Description: 
"""

from crawler.netnr import NetnrCrawler
from crawler.netbian import NetbianCrawler
# from crawler.netnr_asyncio import NetnrCrawler
# from crawler.netbian_asyncio import NetbianCrawler
from utils.color import print_color


def start_spider():
    print_color('高清壁纸：1. NET牛人(https://ss.netnr.com/) 2. 彼岸图网(https://pic.netbian.com/)')
    choice = input('请选择壁纸来源 >> ')
    if choice == '1':
        crawler = NetnrCrawler(dir_path='images/netnr')
    elif choice == '2':
        crawler = NetbianCrawler(dir_path='images/netbian')
    else:
        raise Exception('输入的壁纸来源不正确')
    crawler.run()


if __name__ == '__main__':
    start_spider()
